<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
	<title>游戏直播播放页面</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />

   	<link rel="stylesheet" type="text/css" href="../Ryancss/video_play.css"/>



<style> 

.video_play{margin: 0 4% 4% 4%; width: 80%;} 

</style> 
</head>
<body>



<section class="aui-flexView">

	<section class="aui-scrollView">
		<div class="aui-dot-head">
			<img src="">
			<div class="aui-dot-body">
			<!--	<h2 id="title">聚眾影視</h2>  -->
				<div class="aui-dot-text">请勿相信视频中的任何网址/广告 谨防上当受骗</div>
			</div>
			

		</div>
		<div class="aui-chg-box">
				
<div id="playercontainer" ></div>
		
	
			<h2 class="b-line" id="title">聚眾影視 <!--更多精彩内容，等你来关注！--></h2>
			
			

			
					
			<div class="aui-chg-link" id="vlist_rand_list">
			                                 
									<script type="text/x-dot-template" id="vlist_rand_template">
									{{~ it.msg : value : index }}

										<a onclick="openVideoWin('{{= value. url }}','{{= value. title }}')"  class="aui-flex b-line">
											<div class="aui-logo-block">
												<img src="{{= value. img }}">
											</div>
											<div class="aui-flex-box">
												<h3>{{= value. title }}</h3>
											</div>
											<div class="aui-button-dot">
												<button>观影</button>
											</div>
										</a>
									
									{{~}}
								</script>	
								
								



			</div>
			
					
			
			
			
			<div class="aui-chg-link" id="tvlist_rand_list">
			                                 
									<script type="text/x-dot-template" id="tvlist_rand_template">
									{{~ it.msg : value : index }}

										<a onclick="openVideoWin('{{= value. url }}','{{= value. title }}')"  class="aui-flex b-line">
											<div class="aui-logo-block">
												<img src="{{= value. img }}">
											</div>
											<div class="aui-flex-box">
												<h3>{{= value. title }}</h3>
											</div>
											<div class="aui-button-dot">
												<button>直播</button>
											</div>
										</a>
									
									{{~}}
								</script>	
								
								



			</div>
			
			
			

			
			<div class="aui-chg-link" id="video_play_ad_list">
			                                 
									<script type="text/x-dot-template" id="video_play_ad_template">
									{{~ it.msg : value : index }}

										<a onclick="toBanner('{{= value. linkurl }}')"  class="aui-flex b-line" style=" background-image: url(); background-position: -1px -1px; background-repeat: no-repeat; z-index: 999; ">
											<div class="aui-logo-block">
												<img src="http://juzhongyingshi.wuguq.cn{{= value. picurl }}">
											</div>
											<div class="aui-flex-box">
												<h3>{{= value. name }}</h3>
											</div>
											<div class="aui-button-dot">
												<button>详情</button>
											</div>
										</a>
									
									{{~}}
								</script>	
								
								



			</div>
						
			
			
			
			
			
		<!--
			<div class="aui-chg-link">
				<a href="javascript:;" class="aui-flex b-line">
					<div class="aui-logo-block">
						<img src="/images/logo-001.png" alt="">
					</div>
					<div class="aui-flex-box">
						<h3>通州支行</h3>
					</div>
					<div class="aui-button-dot">
						<button>观看</button>
					</div>
				</a>

			</div>  -->
			
	
		</div>

	</section>
</section>





</body>


<script src="../script/cyberplayer.js"></script>
<script src="../script/video.min.js"></script>
<script src="../script/videojs-contrib-hls.min.js"></script>
<script src="../script/videojs-contrib-quality-levels.min.js"></script>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/doT.js"></script>

<script type="text/javascript">
  var api_url = localStorage.getItem('api_url');



  /////  初始化执行   S /////
  /////  apiready  一打开就执行的 函数
  apiready = function(){

		
  
  
  
  
  
  
  
  
  
  
  var player = cyberplayer("playercontainer").setup({
    //  width: api.winWidth,
		width:api.winWidth-33,
    //  height: 200,
		isLive: true, // 标明是否是直播
      file: api.pageParam.video_flv, // <—rtmp or flv直播地址
      fallbackfile: api.pageParam.video_flv, // <— 备用播放地址，为了手机上能进行直播，设置hls直播流
      controlbar: {
          barLogo: false,
          autostart: true
      },
	  
	   skin: {
            name: "roundster", // 默认皮肤-bce，其他可选项有beelden, bekle, five, glow, roundster, seven, six, stormtrooper, vapor
            background: "#252525", // 背景色设置
            inactive: "#FFF", // 未激活时的颜色
            active: "#FFF", // 悬浮或激活的颜色
        },
	  
	  
      stretching: "uniform",
      volume: 100,
      controls: true,
      ak: "dfd6c7951d4c477bb2555496c8e97166" // 公有云平台注册即可获得accessKey
  });

  player.play();

  player.on('fullscreen', function (ret) {
       //alert( JSON.stringify( ret ) );
       if (ret.fullscreen) {
         api.setScreenOrientation({
             orientation: 'landscape_right'
         });
       }else {
         api.setScreenOrientation({
             orientation: 'portrait_up'
         });
       }
  });

  api.addEventListener({
      name: 'keyback'
  }, function(ret, err) {
    api.setScreenOrientation({
        orientation: 'portrait_up'
    });
    api.closeWin();
  });



  title.innerHTML = api.pageParam.title;   //获取影片名
  
	vlist_rand();   //推荐影片 随机获取
	tvlist_rand();    //影视直播 随机获取
	video_play_ad();   //影视播放页广告







  }
/////  初始化执行   E /////







    //////////////////////    推荐影片 随机获取  方法  vlist_rand  S  //////////////////////
      function vlist_rand(){

			var vlist_rand_list = $api.byId('vlist_rand_list');
			var vlist_rand_template = $api.byId('vlist_rand_template');
			api.ajax({
					url: api_url+'/login/login/vlist_rand.html', 
				method: 'get',              
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
					//alert( JSON.stringify( ret ) );
					var pagefn = doT.template(vlist_rand_template.text);
					vlist_rand_list.innerHTML = pagefn(ret);
					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});
      }

    //////////////////////    推荐影片 随机获取  方法  vlist_rand  E  //////////////////////



//////////////////////   打开视频  方法     S ////////////////////// 

		function openVideoWin(url,name) {


                                                                                             var delay = 0;
                                                                                             if(api.systemType != 'ios'){
                                                                                                 delay = 300;
                                                                                             }
                                                                                             api.openWin({
                                                                                                 name: 'video_play_win',
                                                                                                 url: 'video_play_win.html',
                                                                                                 bounces:false,
                                                                                                 delay: delay,
                                                                                                 slidBackEnabled:true,
                                                                                                 vScrollBarEnabled:false,
																								pageParam:{video:url,title:name}
                                                                                             });
     api.addEventListener({
         name:'viewdisappear'
     },function(){
         api.closeWin({
              name:api.winName
         });
     });


    }

//////////////////////   打开视频  方法     E //////////////////////







    //////////////////////    影视直播 随机获取  方法  tvlist_rand  S  //////////////////////
      function tvlist_rand(){

			var tvlist_rand_list = $api.byId('tvlist_rand_list');
			var tvlist_rand_template = $api.byId('tvlist_rand_template');
			api.ajax({
					url: api_url+'/login/login/tvlist_rand.html', 
				method: 'get',              
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
					//alert( JSON.stringify( ret ) );
					var pagefn = doT.template(tvlist_rand_template.text);
					tvlist_rand_list.innerHTML = pagefn(ret);
					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});
      }

    //////////////////////    影视直播 随机获取  方法  tvlist_rand  E  //////////////////////










    //////////////////////    影视播放页广告  方法  video_play_ad  S  //////////////////////
      function video_play_ad(){

			var video_play_ad_list = $api.byId('video_play_ad_list');
			var video_play_ad_template = $api.byId('video_play_ad_template');
			api.ajax({
					url: api_url+'/login/login/video_play_ad.html', 
				method: 'get',              
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
					//alert( JSON.stringify( ret ) );
					var pagefn = doT.template(video_play_ad_template.text);
					video_play_ad_list.innerHTML = pagefn(ret);
					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});
      }

    //////////////////////    推荐影片 随机获取  方法  tvlist_rand  E  //////////////////////











  //访问轮播地址
 
  function toBanner(url){

    if (url == '') {

	//如果后台填写的跳转链接为空 则无任何操作

    }else{
	
	
	/*
				var str = url ;

				if(str.indexOf("widget://")>-1){   //如果包含 widget://  则执行内部页面跳转


								var str = url;
								var Internal_jump = str.split("widget://html/").join("");
								console.log(Internal_jump);    // 剔除 widget://html/ 后把结果给 Internal_jump
								
								
					　　		api.openWin({
								name: 'Internal_jump',
								url: Internal_jump
								}); 		

*/

/* 

设置中心  widget://html/shezhi_win.html
我的佣金  widget://html/yongjin_win.html
佣金明细  widget://html/yongjinlog_win.html
私人视频  widget://html/video_secret_win.html
升级会员  widget://html/upgrade_vip_win.html
直播专题  widget://html/tv_special_win.html
我的团队  widget://html/tuandui_win.html
提现记录  widget://html/tixianlog_win.html
邀请好友  widget://html/share_win.html
搜索页面  widget://html/search_win.html
观看记录  widget://html/look_record_win.html
我的积分  widget://html/jifen_win.html
帮助中心  widget://html/help_win.html
我的激活码  widget://html/gokalog_win.html
游戏直播间  widget://html/game_zhubo_list_win.html
公告列表  widget://html/artical_win.html
专属客服  widget://html/setup/customer_service_win.html




*/

				if(url == '设置中心'){
					
					api.openWin({
						name: 'shezhi_win',
						url: 'widget://html/shezhi_win.html',
						delay: 300
					});		

				}else if(url == '我的佣金'){
					
					api.openWin({
						name: 'yongjin_win',
						url: 'widget://html/yongjin_win.html',
						delay: 300
					});		
				}else if(url == '佣金明细'){
					
					api.openWin({
						name: 'yongjinlog_win',
						url: 'widget://html/yongjinlog_win.html',
						delay: 300
					});		
				}else if(url == '私人视频'){
					
					api.openWin({
						name: 'video_secret_win',
						url: 'widget://html/video_secret_win.html',
						delay: 300
					});		
				}else if(url == '升级会员'){
					
					api.openWin({
						name: 'upgrade_vip_win',
						url: 'widget://html/upgrade_vip_win.html',
						delay: 300
					});		
				}else if(url == '直播专题'){
					
					api.openWin({
						name: 'tv_special_win',
						url: 'widget://html/tv_special_win.html',
						delay: 300
					});		
				}else if(url == '我的团队'){
					
					api.openWin({
						name: 'tuandui_win',
						url: 'widget://html/tuandui_win.html',
						delay: 300
					});		
				}else if(url == '提现记录'){
					
					api.openWin({
						name: 'tixianlog_win',
						url: 'widget://html/tixianlog_win.html',
						delay: 300
					});		
				}else if(url == '邀请好友'){
					
					api.openWin({
						name: 'share_win',
						url: 'widget://html/share_win.html',
						delay: 300
					});		
				}else if(url == '搜索页面'){
					
					api.openWin({
						name: 'search_win',
						url: 'widget://html/search_win.html',
						delay: 300
					});		
				}else if(url == '观看记录'){
					
					api.openWin({
						name: 'look_record_win',
						url: 'widget://html/look_record_win.html',
						delay: 300
					});		
				}else if(url == '我的积分'){
					
					api.openWin({
						name: 'jifen_win',
						url: 'widget://html/jifen_win.html',
						delay: 300
					});		
				}else if(url == '帮助中心'){
					
					api.openWin({
						name: 'help_win',
						url: 'widget://html/help_win.html',
						delay: 300
					});		
				}else if(url == '我的激活码'){
					
					api.openWin({
						name: 'gokalog_win',
						url: 'widget://html/gokalog_win.html',
						delay: 300
					});		
				}else if(url == '游戏直播间'){
					
					api.openWin({
						name: 'game_zhubo_list_win',
						url: 'widget://html/game_zhubo_list_win.html',
						delay: 300
					});		
				}else if(url == '公告列表'){
					
					api.openWin({
						name: 'artical_win',
						url: 'widget://html/artical_win.html',
						delay: 300
					});		
				}else if(url == '专属客服'){
					
					api.openWin({
						name: 'customer_service_win',
						url: 'widget://html/setup/customer_service_win.html',
						delay: 300
					});		


				}else{       // 否则执行正常H5页面跳转
				
							//	api.toast({
							//	msg: url
							//	});
			
			
			
			                api.openWin({
                            name: 'h5',
                            url: './h5.html',
                            pageParam: {
                                 url: url
								}
                             });

			
				}
	
			
			
	}
  }








    ///////访问轮播地址 方法    toBanner   E   ///////








//////////////////////   返回按钮  方法   closeWin    S //////////////////////
  function closeWin(){
    api.setScreenOrientation({
        orientation: 'portrait_up'
    });
      api.closeWin({
      });
  }
//////////////////////   返回按钮  方法   closeWin    E //////////////////////







</script>
</html>
